import { createRouter, createWebHashHistory } from 'vue-router'

import organizationManagRoute from './modules/organizationManagRoute.ts'
import organizationMemberManageRoute from './modules/organizationMemberManageRoute.ts'
import activityManageRoute from './modules/activityManageRoute.ts'
import logManageRoute from './modules/logManageRoute.ts'
import accountManageRoute from './modules/accountManageRoute.ts'

const routes = [
  {
    path: '/',
    redirect: '/login',
  },
  {
    path: '/login',
    name: 'Login',
    component: () => import('@/views/Login/Login.vue')
  },
  {
    path: '/home',
    component: () => import('@/layouts/Layout.vue'),
    children: [
      { ...organizationManagRoute },
      {...organizationMemberManageRoute},
      { ...activityManageRoute },
      { ...accountManageRoute },
    ]
  }

];


export default createRouter({
  history: createWebHashHistory(),
  routes
});